<template>
  <div class="mui-pages">
    <header class="mui-bar mui-bar-nav">
      <div class="header-common-title flex-justify-start">
        <span @click="fn.back()" class="mui-action-back"><img class="back-btn" src="../../../../static/images/back.png"></span>
        <div class="header-search flex-center">考核积分</div>
      </div>
    </header>
    <div class="assess-header">
      <div class="assess-num flex-center">115.5</div>
      <p class="flex-center">杨某考核积分</p>
      <div class="morning-rangking">上年排名：3</div>
      <div class="current-rangking">目前排名：5</div>
    </div>
    <div class="mui-scroll-wrapper integral-marginTop record-member-lists">
      <div class="mui-scroll">
        <div class="work-message-item-header">
          <h3>党员积分近期明细</h3>
        </div>
        <ul class="mui-table-view organization-lists">
          <li class="mui-table-view-cell" v-for="(item,index) in data" :key="index">
            <div class="flex-between-center">
              <div class="organization-lists-title">{{item.RULE_NAME}}  +{{item.POINTS_}}分</div>
              <div class="flex-between-center integral-num">
                <p>总积分</p>
                <span class="mine-lists-money">{{item.TOTAL_SCORE_}}</span>
              </div>
            </div>
            <p class="organization-lists-time">{{item.CREATE_TIME_}}</p>
          </li>
        </ul>
        <!-- 默认显示近期10条数据。其他用查看更多显示，点击跳转到积分明细 -->
        <p class="flex-center" @click="go()">查看更多>></p>
      </div>
    </div>
  </div>
</template>

<script>
  import tools from '@/utils/tools'
  import api from '@/common/config/api'
  import loginService from '@/service/loginService'

  export default {
    name: 'assessIntegral',
    data () {
      return {
        fn: tools,
        data: []
      }
    },
    created () {
      this.loadData()
    },
    methods: {
      loadData () {
        let data = {
          checkObject: "2",
          keyword: "",
          pageIndex: 0,
          pageSize: 10,
          sortField: "createDate",
          sortOrder: "ASC",
          year: "2020"
        }
        loginService.getOwnTenDetailsList(data).then((res) => {
          if (res.code === 200 && res.data.length < 1) {
            return tools.tip('已无更多数据')
          }
          this.data = res.data
        })
      },
      go () {
        this.$router.push({path: `/rangkingDetails`})
      }
    }

  }
</script>

<style scoped>

</style>
